Demand-Driven Indexing of Prolog Clauses

نویسندگان

  • Vítor Santos Costa
  • Konstantinos Sagonas
  • Ricardo Lopes
چکیده

As logic programming applications grow in size, Prolog systems need to efficiently access larger and larger data sets and the need for anyand multiargument indexing becomes more and more profound. Static generation of multiargument indexing is one alternative, but applications often rely on features that are inherently dynamic which makes static techniques inapplicable or inaccurate. Another alternative is to employ dynamic schemes for flexible demand-driven indexing of Prolog clauses. We propose such schemes and discuss issues that need to be addressed for their efficient implementation in the context of WAMbased Prolog systems. We have implemented demand-driven indexing in two different Prolog systems and have been able to obtain non-negligible performance speedups: from a few percent up to orders of magnitude. Given these results, we see very little reason for Prolog systems not to incorporate some form of dynamic indexing based on actual demand. In fact, we see demand-driven indexing as only the first step towards effective runtime optimization of Prolog programs.

برای دانلود رایگان متن کامل این مقاله و بیش از 32 میلیون مقاله دیگر ابتدا ثبت نام کنید

ثبت نام

اگر عضو سایت هستید لطفا وارد حساب کاربری خود شوید

منابع مشابه

A Superimposed Codeword Indexing Scheme for Handling Sets in Prolog Databases

While there has been growing interest in the use of Prolog for database applications, the size of these applications is limited by the capabilities of current Prolog systems for handling disk resident clauses. A major impediment is the inordinate amount of time required for retrieval and urujication of clauses from a large set stored on disk. Indexing is commonly used in conventional database s...

متن کامل

Linear Time Unit Resolution for Propositional Formulas|in Prolog, Yet

A procedure to analyze a propositional formula in clause form by unit resolution is described and illustrated with a Prolog implementation. It runs in worst-case time that is linear in the length of the formula. The main idea has been independently rediscovered by several implementers. Apparently, its rst journal appearance was a sketch by Dalal and Etherington in 1992. However, there also had ...

متن کامل

A Hitchhiker's Guide to Reinventing a Prolog Machine

We take a fresh, “clean-room” look at implementing Prolog by deriving its translation to an executable representation and its execution algorithm from a simple Horn Clause meta-interpreter. The resulting design has some interesting properties: • the heap representation of terms and the abstract machine instruction encodings are the same • no dedicated code area is used as the code is placed dir...

متن کامل

An Efficient Storage Manager

When dealing with large quantities of clauses, the use of persistent knowledge is inevitable, and indexing methods are essential to answer queries efficiently. We introduce PerKMan, a storage manager that uses G-trees and aims at efficient manipulation of large amount of persistent knowledge. PerKMan may be connected to Prolog systems that offer an external C language interface. As well as the ...

متن کامل

Pre-indexed Terms for Prolog

Indexing of terms and clauses is a well-known technique used in Prolog implementations (as well as automated theorem provers) to speed up search. In this paper we show how the same mechanism can be used to implement efficient reversible mappings between different term representations, which we call pre-indexings. Based on user-provided term descriptions, these mappings allow us to use more effi...

متن کامل

ذخیره در منابع من


  با ذخیره ی این منبع در منابع من، دسترسی به آن را برای استفاده های بعدی آسان تر کنید

عنوان ژورنال:

دوره   شماره 

صفحات  -

تاریخ انتشار 2007